package za.co.smartmi.model;

import java.io.Serializable;

/** 
 * This class represents the primary key of the product table.
 */
public class ProductPk implements Serializable
{
	protected Integer productid;

	/** 
	 * Sets the value of productid
	 */
	public void setProductid(Integer productid)
	{
		this.productid = productid;
	}

	/** 
	 * Gets the value of productid
	 */
	public Integer getProductid()
	{
		return productid;
	}

	/**
	 * Method 'ProductPk'
	 * 
	 */
	public ProductPk()
	{
	}

	/**
	 * Method 'ProductPk'
	 * 
	 * @param productid
	 */
	public ProductPk(final Integer productid)
	{
		this.productid = productid;
	}

	/**
	 * Method 'equals'
	 * 
	 * @param _other
	 * @return boolean
	 */
	public boolean equals(Object _other)
	{
		if (_other == null) {
			return false;
		}
		
		if (_other == this) {
			return true;
		}
		
		if (!(_other instanceof ProductPk)) {
			return false;
		}
		
		final ProductPk _cast = (ProductPk) _other;
		if (productid == null ? _cast.productid != productid : !productid.equals( _cast.productid )) {
			return false;
		}
		
		return true;
	}

	/**
	 * Method 'hashCode'
	 * 
	 * @return int
	 */
	public int hashCode()
	{
		int _hashCode = 0;
		if (productid != null) {
			_hashCode = 29 * _hashCode + productid.hashCode();
		}
		
		return _hashCode;
	}

	/**
	 * Method 'toString'
	 * 
	 * @return String
	 */
	public String toString()
	{
		StringBuffer ret = new StringBuffer();
		ret.append( "za.co.smartmi.dto.ProductPk: " );
		ret.append( "productid=" + productid );
		return ret.toString();
	}

}
